package com.navinfo.tripanalysis.offline.service;

import com.navinfo.tripanalysis.common.pojo.PointProtocol;
import com.navinfo.tripanalysis.offline.pojo.LoadDataParam;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.api.java.JavaSparkContext;
import org.apache.spark.sql.SparkSession;
import scala.Tuple2;

import java.io.Serializable;
import java.util.List;

/**
 * 载入公共轨迹协议的数据服务
 * @author web
 */
public interface LoadPointProtocolService extends Serializable{
    /**
     * 加载公共轨迹协议，按{tid，List<Point0200>}返回，list已排序
     * @param spark
     * @param jsc
     * @param param
     * @return
     */
    JavaRDD<Tuple2<Long, List<PointProtocol>>>  load(SparkSession spark, JavaSparkContext jsc, LoadDataParam param);
}
